Skip to content

Functionality for test-specific queries #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 1, 2025
Merged

Functionality for test-specific queries #316

merged 10 commits into from
Apr 1, 2025

Conversation

f-allian
Copy link
Contributor

@f-allian f-allian commented Mar 6, 2025

  • The entry point can now also parse test-specific queries to filter the data. For example, users can configure their causal_tests.json file to include a query for each test in the following format, e.g.:
{
  "tests": [
    {
      "name": "Temperature Test",
      "estimator": "LinearRegressionEstimator",
      "estimate_type": "coefficient",
      "effect": "direct",
      "treatment_variable": "humidity",
      "query": "temperature > 25",
      "expected_effect": {
        "plant_growth": "Positive"
      },
      "formula": "plant_growth ~ humidity + sunlight + soil_quality",
      "alpha": 0.05,
      "skip": false
    },
  ]
}

@f-allian f-allian added the enhancement New feature or request label Mar 6, 2025
@f-allian f-allian self-assigned this Mar 6, 2025
@f-allian f-allian requested a review from jmafoster1 March 6, 2025 14:50
Copy link

github-actions bot commented Mar 6, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 31 0 0.9s
✅ PYTHON pylint 31 0 5.23s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.64%. Comparing base (c22e149) to head (8fa945b).
Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #316   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files          27       27           
  Lines        1589     1589           
=======================================
  Hits         1488     1488           
  Misses        101      101           
Files with missing lines Coverage Δ
causal_testing/main.py 83.40% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bb31e9...8fa945b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@f-allian f-allian requested a review from jmafoster1 March 6, 2025 16:58
Copy link
Contributor

@jmafoster1 jmafoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good

@f-allian f-allian merged commit 8419eb2 into main Apr 1, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants